<template>
    <a-modal :open="visible" title="添加多边形范围" :destroyOnClose="true" :footer="null" :width="1000"
        @cancel="handleClose">
          
            <fenceRange v-model="path" :itemData="itemData" @ok="handleOk"></fenceRange>
           
    </a-modal>
</template>
<script setup lang="ts">
import {ref} from 'vue'
import fenceRange from '@/components/Amap/fenceRange.vue'

const points = defineModel<any[]>('points')

const props = defineProps<{
    visible: boolean,
    itemData: any
}>()
const emit = defineEmits(['ok', 'close'])
const path = ref([])
const handleOk = () => {
    
    emit('ok', path.value)
    handleClose()
}

const handleClose = () => {
    emit('close')
}

</script>
<style></style>